package com.naiterui.ehp.bs.b2c.order.controller.inner;

import java.util.List;
import java.util.Set;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.naiterui.ehp.bp.bo.b2c.order.OrderBO;
import com.naiterui.ehp.bp.support.exception.PublicService;
import com.naiterui.ehp.bp.support.exception.ResponseVO;
import com.naiterui.ehp.bs.b2c.order.service.IOrderSuperviseService;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 监管订单信息
 *
 * @author luao
 * @date 2021/6/17 1:29 下午
 **/
@Slf4j
@Validated
@RestController
@RequestMapping("b2c/inner/supervise/order")
@RequiredArgsConstructor
public class InnerSuperviseController {

    private final IOrderSuperviseService orderSuperviseService;

    @PostMapping("list")
    public ResponseVO<List<OrderBO>> orderList(@RequestBody Set<Long> recomIds) {
        log.info("订单查询 recomIds:{}", recomIds);
        List<OrderBO> orders = orderSuperviseService.orderList(recomIds);
        return PublicService.returnResponseVO(orders);
    }
}
